package com.wss.lsl.dubbo.demo.server.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.wss.lsl.dubbo.demo.model.Member;
import com.wss.lsl.dubbo.demo.server.MemberService;

@Service("memberService")
public class MemberServiceImpl implements MemberService {

	private static final Map<String, Member> DATA_MAP = new HashMap<String, Member>();

	@Override
	public void saveMember(Member member) {
		String id = member.getId();
		DATA_MAP.put(id, member);
	}

	@Override
	public Member getMemberById(String id) {
		return DATA_MAP.get(id);
	}

}
